package com.mystudy;

public class Program {

	public static void main(String[] args) {
		ImoneyAble[] es = new ImoneyAble[3];//定义了一个ImoneyAble数组
		es[0] = new Manager("张三",8000);
		es[1] = new Saler("李四",2000,100,20);
		es[2] = new Saler("Wang5",3000,80,30);
		for(ImoneyAble eachPerson:es) {
			System.out.printf("%s的月收入为%.1f\r\n", eachPerson,eachPerson.computeMoney());
		}

	}

}
